#pragma once
/************************************************************/
/*  Author:			Michael Mozdzierz						*/
/*	Date:			02/12/2015								*/
/*	Description:	A singleton that controls the current	*/
/*					state of the rasterizer					*/
/*															*/
/************************************************************/
#include <D3D11.h>
#include "GraphicsManager.h"

// Singleton used to control the active rasterizer state
class RasterizerManager
{
	RasterizerManager(void);
	~RasterizerManager(void);
public:
	struct
	{
		ID3D11RasterizerState* CullNone = nullptr;
		ID3D11RasterizerState* CullCounterClockwise = nullptr;
		ID3D11RasterizerState* CullClockwise = nullptr;
	} states;

	// sets the current rasterizer state
	void setRasterizerState(ID3D11RasterizerState* state) { GraphicsManager::GetInstance()->setRasterizerState(state); }
	// gets the current rasterizer state
	ID3D11RasterizerState* getRasterizerState(void) const { return GraphicsManager::GetInstance()->getRasterizerState(); }

	static RasterizerManager* GetInstance(void)
	{
		static RasterizerManager instance;
		return &instance;
	}
};